From c94e080db4594bac41b9b3188a73d890ee4fe905 Mon Sep 17 00:00:00 2001 From: YunQiang Su Date: Thu, 29 Mar 2012 03:50:16 +0800 Subject: [PATCH] Multi-arch it; Add libopencc-dbg package; Bump standard version to 3.9.3; Add YunQiang Su to Uploaders --- debian/changelog | 9 +++++++++ debian/compat | 2 +- debian/control | 21 ++++++++++++++++---- debian/libopencc-dev.install | 6 +++--- debian/libopencc1.install | 4 ++-- debian/patches/fix-new-test-cases.patch | 26 +++++++++++++++++++------ debian/rules | 12 +++++++++++- 7 files changed, 63 insertions(+), 17 deletions(-) diff --git a/debian/changelog b/debian/changelog index c53767d..3027f42 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,12 @@ +opencc (0.3.0-2) unstable; urgency=low + + * Multi-arch it. + * Add libopencc-dbg package. + * Bump standard version to 3.9.3. + * Add YunQiang Su to Uploaders. + + -- YunQiang Su Thu, 29 Mar 2012 03:22:51 +0800 + opencc (0.3.0-1) unstable; urgency=low * Team upload. diff --git a/debian/compat b/debian/compat index 7f8f011..ec63514 100644 --- a/debian/compat +++ b/debian/compat @@ -1 +1 @@ -7 +9 diff --git a/debian/control b/debian/control index 57e3303..a330737 100644 --- a/debian/control +++ b/debian/control @@ -1,9 +1,10 @@ Source: opencc Priority: optional Maintainer: IME Packaging Team -Uploaders: LI Daobing , Asias He -Build-Depends: debhelper (>= 7.0.50~), dpkg-dev (>= 1.16.1.1~), cmake -Standards-Version: 3.9.2 +Uploaders: LI Daobing , Asias He , + YunQiang Su +Build-Depends: debhelper (>= 9), dpkg-dev (>= 1.16.1.1~), cmake +Standards-Version: 3.9.3 Section: libs Homepage: http://code.google.com/p/opencc Vcs-Git: git://git.debian.org/git/pkg-ime/opencc.git @@ -21,8 +22,9 @@ Description: simplified-traditional chinese conversion tool This package includes the conversion tool. Package: libopencc1 -Section: libs Architecture: any +Pre-Depends: ${misc:Pre-Depends} +Multi-Arch: same Depends: ${shlibs:Depends}, ${misc:Depends} Replaces: libopencc0 Conflicts: libopencc0 @@ -41,3 +43,14 @@ Description: simplified-traditional chinese conversion library - development simplified chinese. . This package includes the development support files. + +Package: libopencc-dbg +Section: debug +Priority: extra +Architecture: any +Depends: libopencc1 (= ${binary:Version}), ${misc:Depends} +Description: simplified-traditional chinese conversion library - debug + opencc is a library for converting character between traditional chinese and + simplified chinese. + . + This package includes the debug symbols which is useful when debug. diff --git a/debian/libopencc-dev.install b/debian/libopencc-dev.install index 6cd8ddd..76f28fa 100644 --- a/debian/libopencc-dev.install +++ b/debian/libopencc-dev.install @@ -1,4 +1,4 @@ usr/include/* -usr/lib/lib*.a -usr/lib/lib*.so -usr/lib/pkgconfig/* +usr/lib/*/lib*.a +usr/lib/*/lib*.so +usr/lib/*/pkgconfig/* diff --git a/debian/libopencc1.install b/debian/libopencc1.install index 30186ac..f4191f2 100644 --- a/debian/libopencc1.install +++ b/debian/libopencc1.install @@ -1,3 +1,3 @@ -usr/lib/lib*.so.* -usr/share/opencc/* +usr/lib/*/lib*.so.* +usr/lib/*/opencc/* usr/share/locale/* diff --git a/debian/patches/fix-new-test-cases.patch b/debian/patches/fix-new-test-cases.patch index c9c73de..5d9339e 100644 --- a/debian/patches/fix-new-test-cases.patch +++ b/debian/patches/fix-new-test-cases.patch @@ -1,9 +1,12 @@ -Description: Fix new test cases +Description: Fix new test cases, install data file to meet need of multi-arch Copy nedded dict files to ${PROJECT_BINARY_DIR}/data for tests. -Author: Kan-Ru Chen + Install data files to ${DIR_LIBRARY} instead of ${DIR_SHARE} +Author: Kan-Ru Chen , YunQiang Su ---- a/data/CMakeLists.txt -+++ b/data/CMakeLists.txt +Index: opencc/data/CMakeLists.txt +=================================================================== +--- opencc.orig/data/CMakeLists.txt 2012-03-29 01:56:20.043932047 +0800 ++++ opencc/data/CMakeLists.txt 2012-03-29 03:16:12.183694991 +0800 @@ -92,4 +92,10 @@ ${CHINA_DICT_FILES} DESTINATION @@ -17,8 +20,10 @@ Author: Kan-Ru Chen + configure_file(${DICT} ${PROJECT_BINARY_DIR}/data COPYONLY) + endforeach (DICT) +endif (BUILD_TESTING) ---- a/CMakeLists.txt -+++ b/CMakeLists.txt +Index: opencc/CMakeLists.txt +=================================================================== +--- opencc.orig/CMakeLists.txt 2012-03-29 01:56:20.043932047 +0800 ++++ opencc/CMakeLists.txt 2012-03-29 03:16:34.919807728 +0800 @@ -20,6 +20,7 @@ cmake_minimum_required(VERSION 2.8) set (PACKAGE_NAME opencc) @@ -27,3 +32,12 @@ Author: Kan-Ru Chen enable_testing() ######## Package information +@@ -86,7 +87,7 @@ + set (DIR_ETC ${SYSCONF_INSTALL_DIR}) + endif (DEFINED SYSCONF_INSTALL_DIR) + +-set (DIR_SHARE_OPENCC ${DIR_SHARE}/opencc) ++set (DIR_SHARE_OPENCC ${DIR_LIBRARY}/opencc) + set (DIR_SHARE_LOCALE ${DIR_SHARE}/locale) + + ######## Configuration diff --git a/debian/rules b/debian/rules index 75ecb9a..69a6c8a 100755 --- a/debian/rules +++ b/debian/rules @@ -3,8 +3,18 @@ export DEB_BUILD_MAINT_OPTIONS = hardening=+all DPKG_EXPORT_BUILDFLAGS = 1 include /usr/share/dpkg/buildflags.mk +DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH) + %: dh $@ override_dh_auto_configure: - dh_auto_configure -- -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Release -DENABLE_GETTEXT:BOOL=ON + dh_auto_configure -- \ + -DCMAKE_INSTALL_PREFIX=/usr \ + -DCMAKE_INSTALL_LIBDIR=/usr/lib/${DEB_HOST_MULTIARCH}/ \ + -DCMAKE_BUILD_TYPE=Release \ + -DENABLE_GETTEXT:BOOL=ON + +override_dh_strip: + dh_strip -plibopencc1 --dbg-package=libopencc-dbg + dh_strip -- 2.30.2